package com.oj.api.core.service;

import com.oj.api.core.CoreApi;
import com.oj.api.core.domain.ProblemInfo;
import com.oj.api.core.domain.ProblemSetCategoryInfo;
import com.oj.api.core.domain.ProblemSetInfo;
import com.oj.common.ICrudService;
import com.oj.common.IServiceLayer;
import com.oj.common.InfoPage;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 题目服务的接口
 * Created by Bing on 2018/5/4.
 */
@FeignClient(value= CoreApi.APPID,path="/"+CoreApi.BEAN_PROBLEM_SET_CATEGORY_SERVICE)
public interface IProblemSetCategoryService extends ICrudService<ProblemSetCategoryInfo>{


    @PostMapping("/findProblemSetInfo")
    ProblemSetInfo findProblemSetInfo(ProblemSetInfo problemSetInfo);

    @PostMapping("/findProblemSetInfos")
    List<ProblemSetInfo> findProblemSetInfos(ProblemSetInfo problemSetInfo);

    @GetMapping("/findProblemInfo/{code}")
    ProblemInfo findProblemInfo(@PathVariable("code") String code);

    @PostMapping("/saveProblem")
    ProblemInfo saveProblemInfo(ProblemInfo problemInfo);


    @PostMapping("/findPageProblemInfos")
    InfoPage<ProblemInfo> findPageProblemInfos(ProblemInfo problemInfo);

    @PostMapping("/addProblemsToSet")
    ProblemSetInfo addProblemsToSet(ProblemSetInfo problemSetInfo);

    @PostMapping("/createSet")
    ProblemSetCategoryInfo createSet(ProblemSetCategoryInfo problemSetCategoryInfo);

    @PostMapping("/updateSet")
    ProblemSetInfo updateSet(ProblemSetInfo problemSetInfo);

    @GetMapping("/problemSet/{code}")
    ProblemSetInfo getProblemSet(@PathVariable("code") String code);
}
